<?php

require_once("./Model/m_Logger.php");

class v_Log {
	
	public function showMessages() {
		$rtn = "<h2>Showing messages..</h2>";
		
		
		$m_Logger = new m_Logger();
		$m_Logger->setLogMessage("lh->DoLoginDB() funkar itne, rätt användare på DB, fel lösen");
		
		$rtn .= "<p>Errors</p>";
		$errors = $m_Logger->getLogErrors();
		foreach($errors as $error) {
			$rtn .= "<p><font color='red'>" . $error . "</p></font>";
		}		
		
		$rtn .= "<p>Messages</p>";
		$messages = $m_Logger->getLogMessages();
		
		foreach($messages as $message) {
			$rtn .= "<p>" . $message . "</p>";
		}
		
		
		return $rtn;
	}
	
}